import request from '@/utils/request'
import request1 from "../../utils/request1";

// 查询产品方案列表
export function listProductType(query) {
  return request({
    url: '/insurance/productType/list',
    method: 'get',
    params: query
  })
}

// 查询产品方案详细
// export function getProductType(id) {
//   return request({
//     url: '/insurance/productType/' + id,
//     method: 'get'
//   })
// }
// 查询产品方案详细
export function getProductType(id) {
  return request1({
    url: '/Insurance/get_plan_type?type_id=' + id,
    method: 'get'
  })
}

// 新增产品方案
export function addProductType(data) {
  return request({
    url: '/insurance/productType',
    method: 'post',
    data: data
  })
}

// 修改产品方案
export function updateProductType(data) {
  return request({
    url: '/insurance/productType',
    method: 'put',
    data: data
  })
}

// 删除产品方案
export function delProductType(id) {
  return request({
    url: '/insurance/productType/' + id,
    method: 'delete'
  })
}

// 导出产品方案
export function exportProductType(query) {
  return request({
    url: '/insurance/productType/export',
    method: 'get',
    params: query
  })
}
//查询方案列表
export function plan_type_list(query) {
  return request1({
    url: '/Sysuser/plan_type_list',
    method: 'get',
    params: query
  })
}
//获取下级人员列表
export function seacond_admin(query) {
  return request1({
    url: '/insurance/seacond_admin',
    method: 'get',
    params: query
  })
}
